package com.jgsu.sell.service;

import com.jgsu.sell.dataobject.OrderMaster;
import com.jgsu.sell.dto.OrderDto;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * 描述:
 * OrderService
 *
 * @author lqd12
 * @create 2018-08-18 22:32
 */
public interface OrderService {
    /**
     * 创建订单
     * @param orderDto
     * @return
     */
    OrderDto create(OrderDto orderDto);

    /**
     * 查询单个订单
     * @param orderId
     * @return
     */
    OrderDto findOne(String orderId);

    /**
     * 查询某人的订单
     * @param buyerOpenid
     * @param pageable
     * @return
     */
    Page<OrderDto> findList(String buyerOpenid, Pageable pageable);

    /**
     * 取消
     * @return
     */
    OrderDto cancel(OrderDto orderDto);

    /**
     * 完成
     * @return
     */
    OrderDto finish(OrderDto orderDto);

    /**
     * 支付
     * @return
     */
    OrderDto paid(OrderDto orderDto);

    /**
     * 后台查询订单
     * @param pageable
     * @return
     */
    Page<OrderDto> findList(Pageable pageable);
}
